package com.dragon.design.pattern.creational.singleton;

/**
 * @author dragon
 * @version V1.0.0-RELEASE
 * @date 2019/5/15 18:25
 */
public class lazySingletonTest {

    public static void main(String[] args) {
        System.out.println("mainThread" + LazySingleton.getInstance());
        System.out.println("mainThread" + LazySingleton.getInstance());
        System.out.println("program start");
        Thread thread1 = new Thread(new LazySingletonThread());
        Thread thread2 = new Thread(new LazySingletonThread());
        thread1.start();
        thread2.start();
        System.out.println("program end");
    }
}
